<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>HelloWorld</title>
    <script type="text/javascript" src="../assets/js/vue.js"></script>
</head>
<body>
    <h1>v-if & v-else & v-show</h1>
    <hr>
    <div id="app">
        <div v-if="isLogin">你好,JSPang,v-if 判断是否加载,可以减轻服务器的压力,在需要时加载</div>
        <div v-if="isPass" v-else>请登录!</div>
        <div v-show="isShow">v-show 加载,相当于把css=display:none,可以使客户端操作更加流畅</div>
    </div>
    <script type="text/javascript">
        var app = new Vue({
            el:'#app',
            data:{
                isLogin : false,
                isPass:false,
                isShow:true
            }
        })
    </script>
</body>
</html>